package com.qcby.teacher.service.impl;

import com.qcby.teacher.dao.TeachDao;
import com.qcby.teacher.entity.Teach;
import com.qcby.teacher.service.TeachService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeachServiceImpl implements TeachService {

    @Autowired
    private TeachDao teachDao;

    @Override
    public List<Teach> findAll(Integer page, Integer pageSize, String title) {
        return teachDao.findAll(page, pageSize, title);
    }

    @Override
    public int deleteById(Integer id) {
        return teachDao.deleteById(id);
    }

    @Override
    public int insertTeach(Teach teach) {
        return teachDao.insertTeach(teach);
    }

    @Override
    public int getCount(Integer title) {
        return teachDao.getCount(title);
    }

    @Override
    public String getPdfUrl(Integer id) {
        return teachDao.getPdfUrl(id);
    }
}
